module.exports = function($scope, $stateParams, $state, $modal, $modalInstance,FileUploader,$resource,toaster,expert_code,sort){  
    console.log(expert_code,sort);
    $scope.info = {
        'sort' : sort
    }
    // if(sort) {

    // }
    $scope.ok = function(){
        $resource('/api/ac/ggc/reviewExpertService/updateExpertSort', {}, {}).
        save({'expert_code' : expert_code, 'sort' : $scope.info.sort},function(res) {
            if (res.errcode !== 0) {
                toaster.error({title:"",body:res.errmsg});
                return;
            }
            toaster.success({title:"",body:"优先成功"});
            $modalInstance.close();
        })
    }
    
    $scope.cancel = function () {
        $modalInstance.close();
    };

};